//
//  SIDemoViewController.swift
//  SinaImiate
//
//  Created by xiaoming on 16/6/29.
//  Copyright © 2016年 GoodJob. All rights reserved.
//

import UIKit

class SIDemoViewController: SIBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }
    
    @objc private func jumpNext() {
        
        let vc = SIDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
        
    }
    
}

extension SIDemoViewController {
    
    override func setupTableView() {
     
         super.setupTableView()
        
//        let btn:UIButton = UIButton.cz_textButton("下一个", fontSize: 16, normalColor: UIColor.darkGray(), highlightedColor: UIColor.orange())
//        
//        btn.addTarget(self, action: #selector(jumpNext), for: .touchUpInside)
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(jumpNext))
        
//        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: .plain, target: self, action: #selector(jumpNext))
    }
}
